package com.example.enums;

/**
 * @author ：chengyoubang
 * @version ：V1.0
 * @program ：first-service
 * @date ：Created in 2023/12/24 14:28
 * @description ：
 */
public enum EducationalBackGroundEnum {
  ZHUAN_KE("专科",1,0.8),
  BEN_KE("本科",2,1.0),
  HIGN_BEN_KE("双一流本科",3,1.2),
  SUO_SHI("硕士",4,1.4),
  HIGH_SUO_ID("双一流硕士",5,1.6),
  BO_SHI("博士",6,1.8),
  HIGN_BO_SHI("双一流博士",7,2.0)
  ;
  private String name;
  private Integer type;
  private Double ratio;

  EducationalBackGroundEnum(String name, Integer type, Double ratio) {
    this.name = name;
    this.type = type;
    this.ratio = ratio;
  }

  public static Double getRatio(Integer type){
    for(EducationalBackGroundEnum rest:EducationalBackGroundEnum.values()){
      if(rest.type.equals(type))
        return rest.ratio;
    }
    return null;
  }
}

